home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / spiele / zebulon / src / zebulon.t < prev    next >
Text File  |  1997-01-14  |  6KB  |  174 lines

  1. /* $Id: zebulon.t 1.15 96/04/16 21:56:51 mol Exp $
  2.  **********************************************************************
  3.  *
  4.  * Uncle Zebulon's Will, version 2.0
  5.  *
  6.  * An adventure game, written in TADS 2.2.
  7.  *
  8.  * zebulon.t - Main module
  9.  *
  10.  **********************************************************************
  11.  * 
  12.  * Copyright (c) 1995-96 by Magnus Olsson (mol@df.lth.se).
  13.  * All rights reserved.
  14.  *
  15.  * This source code may be copied and distributed freely as long as the 
  16.  * following conditions are met:
  17.  *   - no fee may be charged for the code (a nominal fee may be charged
  18.  *     to cover distribution costs)
  19.  *   - the code is not modified in any way
  20.  *   - this copyright notice is not removed or modified in any way
  21.  *
  22.  * You may use individual parts of this code in your programs
  23.  * as long as they are attributed to the author. You are not allowed
  24.  * to use the plot, story, characters or text of the game without the
  25.  * written permission of the author.
  26.  *
  27.  ***********************************************************************/
  28.  
  29. /***************************************************************************
  30.  
  31.   To compile this game, you need the TADS compiler version 2.2 or later.
  32.   On most systems, the command to compile it is either
  33.   See the accompanying release notes for more information.
  34.     
  35.   The score is computed as follows:
  36.   
  37.   Reading the letter              5 points
  38.   Finding paper in book                 5 points
  39.   Eating tomato                 5 points
  40.   Fitting first eye of dog           5 points
  41.   Turning on the dog               5 points
  42.   Opening gate to endgame        15 points
  43.   Putting thing in bottle         5 points
  44.   Opening mirror            10 points
  45.   Offering final coin            10 points
  46.   Winning                10 points
  47.  
  48.  ***************************************************************************/
  49.  
  50. #include "z_std.t"
  51. #include "rooms.t"
  52. #include "sitroom.t"
  53. #include "shed.t"
  54. #include "demon.t"
  55. #include "items.t"
  56. #include "endgame.t"
  57.  
  58. modify global
  59.     maxscore = 75
  60. ;
  61.  
  62. modify version
  63.     sdesc = "\(Uncle Zebulon's Will\), an Interactive Inheritance.\n
  64.         Release 2.0 / 960416\b
  65.         Copyright (c) 1995, 1996 by Magnus Olsson. 
  66.     All rights reserved.\n
  67.     This game was awarded the first prize in the TADS section of
  68.     the\nFirst Annual IF Competition, 1995\n
  69.         Developed with TADS, the Text Adventure Development System.\b"
  70. ;
  71.  
  72. info : object
  73.     infotext = "\b\(Uncle Zebulon's Will\) was written by Magnus Olsson
  74.         (mol@df.lth.se) for the First Annual IF Competition, 1995.\b
  75.     Copyright (c) 1995, 1996 by Magnus Olsson. All rights reserved.\b
  76.     This program is freeware. It is \(not\) in the public domain.
  77.     You may copy and distribute it as long as it is not modified
  78.     in any way. It may not be sold for profit, though a nominal 
  79.     distribution fee may be charged. Please contact the author
  80.     for more information.\b
  81.     Source code is available - see the release notes for details.\b
  82.     Thanks to play testers Michael Kinyon, Sean Molley and
  83.     Paul David Doherty for
  84.     many valuable suggestions and invaluable bug reports, as well as to 
  85.     Jason Dyer, Kevin Wilson, Darryl O'Neill and Carl D.\ Cravens 
  86.     for their much-appreciated feedback.\b
  87.     Disclaimers:\n
  88.     This game is a piece of fiction. All characters, places and
  89.     situations are figments of the author's imagination. Any similarities
  90.     between characters in the game and real persons, living or
  91.     dead, are purely coincidental.\n
  92.     \"Uncle Zebulon's Will\" was designed to be a short, simple 
  93.     game that fulfils
  94.     the competition rule of being winnable in two hours. Hopefully,
  95.     this doesn't make it too trivial.\b
  96.     Finally, the author would like to apologize for the awful poem
  97.     that appears in the game. Clearly uncle Zebulon was better as a
  98.     wizard than as a poet. "
  99.     
  100.     helptext = "\bThis game was designed to be a simple one. I've
  101.         deliberately not provided any hints, since I think that
  102.     hints spoil a lot of the fun and since I believe that this
  103.     game is so simple that it doesn't need any. If you're  
  104.     stuck, then I was obviously wrong; please accept my apologies.
  105.     If you're really stuck, feel free to email me (mol@df.lth.se) 
  106.     for help. "
  107. ;    
  108.  
  109. /*
  110.  * The following function is called (instead of die, since you can't die
  111.  * int his game) when they player has lost the game.
  112.  */
  113. fail : function
  114. {    
  115.     "\tAfter attending your uncle's funeral, you go back to college and
  116.     complete your education as an accountant, embarking on a successful
  117.     and satisfying career. Sometimes, your thoughts go flashing back
  118.     to uncle Zebulon, and you have a nagging sense that you've missed
  119.     something important. Those feelings soon pass; after all, you have
  120.     more important things to deal with.\b
  121.     ***** You have failed *****\b ";
  122.     game_over();
  123. }
  124.  
  125. /*
  126.  * Class for treasures. The demon will only let you take one object
  127.  * of this class from the house, and when you do, the inheritance
  128.  * attribute will be set.
  129.  */        
  130. class treasure : item
  131.     inheritance = nil // True if player has accepted it as his inheritance
  132. ;
  133.  
  134. /*
  135.  * Some minor modifications to the player.
  136.  */
  137. modify Me
  138.     noun = 'richard'
  139.     inheritance = nil // Set to the treasure chosen as inheritance.
  140.     wand_effect = {
  141.         " that explode with little popping noises as they strike you.
  142.     They don't seem to hurt you, though the sensation is quite 
  143.     unpleasant. ";
  144.     }
  145.     ioPourOn(actor, dobj) = {
  146.         if (dobj = acid)
  147.         "Feeling suicidal today? ";
  148.     else
  149.         pass ioPourOn;
  150.     }
  151.     verDoEat(actor) = {
  152.         "That doesn't seem very productive. ";
  153.     }
  154. ;
  155.  
  156. /*
  157.  * Uncle Zebulon gets his own object, even though he's not around - 
  158.  * this allows the player to refer to him.
  159.  */
  160. uncle : Actor
  161.     noun = 'uncle' 'zebulon' 'zeb' 'wizard' 'sorcerer'
  162.     adjective = 'late' 'uncle'
  163.     article = 'my'
  164.     isHim = true
  165.     sdesc = "Uncle Zebulon"
  166.     adesc = { self.sdesc; }
  167.     thedesc = { self.sdesc; }
  168.     location = nil // Uncle Zebulon isn't around anymore (but we may want
  169.                // to refer to him).
  170. ;
  171.     
  172.     
  173.  
  174.